The present invention relates in general to new and improved monitoring apparatus for use in a data processing system, in particular to apparatus for monitoring the switching of a central processing unit from one program to another and for preventing such switching until the requirements of the first program have been fully satisfied.
In data processing systems, it is common practice for a central processing unit operating under control of a particular program to switch to another program, or programs, in the course of a relatively brief time interval. When such is the case, it is important that any status reports sent back to the CPU pursuant to operations carried out by it, apply to the same program under the control of which the CPU is operating when carrying out the operations in question.
For example, where the CPU, operating under a first program, sends out Read Commands to the memory of the data processing system, care must be taken that the Read Data so collected is matched up with the Read Command. Similarly, when a Write Command is issued while the CPU is operating under the first program, the Write Status signal sent back to the CPU must be that which applies to the program under which the original Write Command was issued.
If such is not the case, the returned signal, whether Read data or a Write Status report, may report a fatal error with respect to a program that no longer has control of the CPU at the time the information is returned. Under those conditions, the fatal error report will be attributed to the second program and whatever operation is then in process under the control of the second program, will be incorrectly aborted.
In many prior art devices the problem is solved by arbitrarily inserting a delay prior to switching between successive programs. Thus, if it is determined that under worst case conditions a status report may be returned as much as 50 microseconds after the original request is issued, it is possible to arbitrarily insert a fixed delay interval following each command issued before another program is allowed to take over control of the CPU. With such an arrangement however, flexibility is lost to the extent that situations beyond those normally anticipated cannot be accommodated, except by unduly prolonging the delay interval to allow for a safety margin. Further, system performance is degraded where the mandatory delay interval exceeds, on average, the time interval required for the status to be reported back following a command.